name: pre-commit run_id: commands[2] env HOME: /home/jenkins env LANG: C.UTF-8 env OLM_TIMER1: 3000 env OLM_TIMER2: 2000 env PATH: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-yunH/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 395812394 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/transportpce-tox-verify-transportpce-master/.tox env VIRTUAL_ENV: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2462 cwd: /w/workspace/transportpce-tox-verify-transportpce-master/tests allow: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit/bin/*:sh:cpan:sudo:which:fixCIcentOS8reposMirrors.sh cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [WARNING] hook id `perltidy` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Initializing environment for https://github.com/perltidy/perltidy. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/perltidy/perltidy. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing tests/transportpce_tests/pce/test05_pce_tapi.py Fixing tests/transportpce_tests/common/test_utils_generate_tapi_topo.py Tabs remover.............................................................Passed autopep8.................................................................Failed - hook id: autopep8 - exit code: 1 - files were modified by this hook Traceback (most recent call last): File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/bin/autopep8", line 7, in sys.exit(main()) ^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 4543, in main results = fix_multiple_files(args.files, args, sys.stdout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 4438, in fix_multiple_files ret = _fix_file((name, options, output)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 4408, in _fix_file return fix_file(*parameters) ^^^^^^^^^^^^^^^^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 3604, in fix_file fixed_source = fix_lines(fixed_source, options, filename=filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 3584, in fix_lines fixed_source = fix.fix() ^^^^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 618, in fix self._fix_source(filter_results(source=''.join(self.source), File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 562, in _fix_source modified_lines = fix(result) ^^^^^^^^^^^ File "/home/jenkins/.cache/pre-commit/repobzltey5n/py_env-python3.11/lib/python3.11/site-packages/autopep8.py", line 766, in fix_e225 pycodestyle.missing_whitespace_around_operator(fixed, ts)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pycodestyle' has no attribute 'missing_whitespace_around_operator'. Did you mean: 'whitespace_around_operator'? perltidy.................................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/transportpce_tests/common/test_utils_generate_tapi_topo.py b/tests/transportpce_tests/common/test_utils_generate_tapi_topo.py index 375b1b4ec..40d816398 100644 --- a/tests/transportpce_tests/common/test_utils_generate_tapi_topo.py +++ b/tests/transportpce_tests/common/test_utils_generate_tapi_topo.py @@ -24,6 +24,7 @@ sys.path.append('transportpce_tests/common/') import test_utils # nopep8 # pylint: disable=too-few-public-methods + class UuidServices: def __init__(self): # pylint: disable=invalid-name @@ -31,6 +32,7 @@ class UuidServices: self.odu = None self.dsr = None + class UuidServices2: def __init__(self): # pylint: disable=invalid-name @@ -38,6 +40,7 @@ class UuidServices2: self.odu = None self.dsr = None + class UuidServices3: def __init__(self): # pylint: disable=invalid-name @@ -47,6 +50,7 @@ class UuidServices3: # class TransportPCEtesting(unittest.TestCase): + processes = None WAITING = 20 # nominal value is 300 NODE_VERSION = '2.2.1' @@ -56,6 +60,7 @@ uuid_services3 = UuidServices3() del_serv_input_data = {"uuid": "TBD"} tapi_topo = {"topology-id": "TBD"} + def initSimulators(): print("Entering TestUtils setupClass starting simulators") print("Node version is {}".format(NODE_VERSION)) @@ -66,8 +71,9 @@ def initSimulators(): ('xpdrc', NODE_VERSION), ('spdrc', NODE_VERSION)]) + def connect_xpdrs(): - + print("Connecting SPDRA") response = test_utils.mount_device("SPDR-SA1", ('spdra', NODE_VERSION)) time.sleep(2) @@ -81,6 +87,7 @@ def connect_xpdrs(): response = test_utils.mount_device("XPDR-C1", ('xpdrc', NODE_VERSION)) time.sleep(2) + def connect_rdms(): print("Connecting ROADMA") response = test_utils.mount_device("ROADM-A1", ('roadma', NODE_VERSION)) @@ -93,6 +100,7 @@ def connect_rdms(): print("Connecting ROADMC failed") time.sleep(2) + def interconnect_roadm_and_xpdr(): response = test_utils.transportpce_api_rpc_request( 'transportpce-networkutils', 'init-xpdr-rdm-links', @@ -295,6 +303,7 @@ def interconnect_roadm_and_xpdr(): print("Connection from ROADMC1 to SPDRSC1-X2 succeeded") time.sleep(2) + def add_omsAttributes_to_ROADM2ROADM_links(): # Config ROADMA-ROADMC oms-attributes data = {"span": { @@ -331,6 +340,7 @@ def add_omsAttributes_to_ROADM2ROADM_links(): else: print("OMS attributes added on link ROADMC-ROADMA") + def create_services_on_infra(self): create_connectivity_service_PhotonicMedia(self) get_service_PhotonicMedia(self) @@ -345,6 +355,7 @@ def create_services_on_infra(self): create_connectivity_service_DSR(self) get_service_DSR(self) + def create_connectivity_service_PhotonicMedia(self): self.cr_serv_input_data["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = self.sAOTS self.cr_serv_input_data["end-point"][1]["service-interface-point"]["service-interface-point-uuid"] = self.sZOTS @@ -371,14 +382,15 @@ def create_connectivity_service_PhotonicMedia(self): 'value': 'SPDR-SA1-XPDR1'} tpcetest.assertDictEqual(dict(input_dict_1, **response['output']['service']), - response['output']['service']) + response['output']['service']) tpcetest.assertDictEqual(dict(input_dict_2, **response['output']['service']['end-point'][0]['name'][0]), - response['output']['service']['end-point'][0]['name'][0]) + response['output']['service']['end-point'][0]['name'][0]) tpcetest.assertDictEqual(dict(input_dict_3, **response['output']['service']['end-point'][1]['name'][0]), - response['output']['service']['end-point'][1]['name'][0]) + response['output']['service']['end-point'][1]['name'][0]) # If the gate fails is because of the waiting time not being enough # time.sleep(self.WAITING) + def get_service_PhotonicMedia(self): response = test_utils.get_ordm_serv_list_attr_request("services", str(tpcetest.uuid_services.pm)) print("getServiceResponse Service1 PhotonicMedia: {}".format(response)) @@ -389,6 +401,7 @@ def get_service_PhotonicMedia(self): tpcetest.assertEqual(response['services'][0]['lifecycle-state'], 'planned') time.sleep(1) + def create_connectivity_service2_PhotonicMedia(self): self.cr_serv_input_data["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = self.s2AOTS self.cr_serv_input_data["end-point"][1]["service-interface-point"]["service-interface-point-uuid"] = self.s2ZOTS @@ -416,14 +429,15 @@ def create_connectivity_service2_PhotonicMedia(self): 'value': 'SPDR-SA1-XPDR2'} tpcetest.assertDictEqual(dict(input_dict_1, **response['output']['service']), - response['output']['service']) + response['output']['service']) tpcetest.assertDictEqual(dict(input_dict_2, **response['output']['service']['end-point'][0]['name'][0]), - response['output']['service']['end-point'][0]['name'][0]) + response['output']['service']['end-point'][0]['name'][0]) tpcetest.assertDictEqual(dict(input_dict_3, **response['output']['service']['end-point'][1]['name'][0]), - response['output']['service']['end-point'][1]['name'][0]) + response['output']['service']['end-point'][1]['name'][0]) # If the gate fails is because of the waiting time not being enough # time.sleep(self.WAITING) + def get_service2_PhotonicMedia(self): response = test_utils.get_ordm_serv_list_attr_request("services", str(tpcetest.uuid_services2.pm)) print("getServiceResponse Service2 PhotonicMedia: {}".format(response)) @@ -434,6 +448,7 @@ def get_service2_PhotonicMedia(self): tpcetest.assertEqual(response['services'][0]['lifecycle-state'], 'planned') time.sleep(1) + def create_connectivity_service3_PhotonicMedia(self): self.cr_serv_input_data["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = self.s3AOTS self.cr_serv_input_data["end-point"][1]["service-interface-point"]["service-interface-point-uuid"] = self.s3ZOTS @@ -461,14 +476,15 @@ def create_connectivity_service3_PhotonicMedia(self): 'value': 'SPDR-SA1-XPDR3'} tpcetest.assertDictEqual(dict(input_dict_1, **response['output']['service']), - response['output']['service']) + response['output']['service']) tpcetest.assertDictEqual(dict(input_dict_2, **response['output']['service']['end-point'][0]['name'][0]), - response['output']['service']['end-point'][0]['name'][0]) + response['output']['service']['end-point'][0]['name'][0]) tpcetest.assertDictEqual(dict(input_dict_3, **response['output']['service']['end-point'][1]['name'][0]), - response['output']['service']['end-point'][1]['name'][0]) + response['output']['service']['end-point'][1]['name'][0]) # If the gate fails is because of the waiting time not being enough # time.sleep(self.WAITING) + def get_service3_PhotonicMedia(self): response = test_utils.get_ordm_serv_list_attr_request("services", str(tpcetest.uuid_services3.pm)) print("getServiceResponse Service3 PhotonicMedia: {}".format(response)) @@ -480,6 +496,8 @@ def get_service3_PhotonicMedia(self): time.sleep(1) # test create connectivity service from spdrA to spdrC for odu + + def create_connectivity_service_ODU(self): # pylint: disable=line-too-long self.cr_serv_input_data["layer-protocol-name"] = "ODU" @@ -515,14 +533,15 @@ def create_connectivity_service_ODU(self): 'value': 'SPDR-SA1-XPDR1'} tpcetest.assertDictEqual(dict(input_dict_1, **response['output']['service']), - response['output']['service']) + response['output']['service']) tpcetest.assertDictEqual(dict(input_dict_2, **response['output']['service']['end-point'][0]['name'][0]), - response['output']['service']['end-point'][0]['name'][0]) + response['output']['service']['end-point'][0]['name'][0]) tpcetest.assertDictEqual(dict(input_dict_3, **response['output']['service']['end-point'][1]['name'][0]), - response['output']['service']['end-point'][1]['name'][0]) + response['output']['service']['end-point'][1]['name'][0]) # If the gate fails is because of the waiting time not being enough # time.sleep(self.WAITING) + def get_service_ODU(self): response = test_utils.get_ordm_serv_list_attr_request("services", str(tpcetest.uuid_services.odu)) tpcetest.assertEqual(response['status_code'], requests.codes.ok) @@ -533,6 +552,8 @@ def get_service_ODU(self): time.sleep(1) # test create connectivity service from spdrA to spdrC for odu + + def create_connectivity_service3_ODU(self): # pylint: disable=line-too-long self.cr_serv_input_data["layer-protocol-name"] = "ODU" @@ -568,14 +589,15 @@ def create_connectivity_service3_ODU(self): 'value': 'SPDR-SA1-XPDR3'} tpcetest.assertDictEqual(dict(input_dict_1, **response['output']['service']), - response['output']['service']) + response['output']['service']) tpcetest.assertDictEqual(dict(input_dict_2, **response['output']['service']['end-point'][0]['name'][0]), - response['output']['service']['end-point'][0]['name'][0]) + response['output']['service']['end-point'][0]['name'][0]) tpcetest.assertDictEqual(dict(input_dict_3, **response['output']['service']['end-point'][1]['name'][0]), - response['output']['service']['end-point'][1]['name'][0]) + response['output']['service']['end-point'][1]['name'][0]) # If the gate fails is because of the waiting time not being enough # time.sleep(self.WAITING) + def get_service3_ODU(self): response = test_utils.get_ordm_serv_list_attr_request("services", str(tpcetest.uuid_services3.odu)) tpcetest.assertEqual(response['status_code'], requests.codes.ok) @@ -585,6 +607,8 @@ def get_service3_ODU(self): tpcetest.assertEqual(response['services'][0]['lifecycle-state'], 'planned') # test create connectivity service from spdrA to spdrC for dsr + + def create_connectivity_service_DSR(self): # pylint: disable=line-too-long self.cr_serv_input_data["layer-protocol-name"] = "DSR" @@ -621,17 +645,18 @@ def create_connectivity_service_DSR(self): 'value': 'SPDR-SA1-XPDR1'} tpcetest.assertDictEqual(dict(input_dict_1, - **response['output']['service']), - response['output']['service']) + **response['output']['service']), + response['output']['service']) tpcetest.assertDictEqual(dict(input_dict_2, - **response['output']['service']['end-point'][0]['name'][0]), - response['output']['service']['end-point'][0]['name'][0]) + **response['output']['service']['end-point'][0]['name'][0]), + response['output']['service']['end-point'][0]['name'][0]) tpcetest.assertDictEqual(dict(input_dict_3, - **response['output']['service']['end-point'][1]['name'][0]), - response['output']['service']['end-point'][1]['name'][0]) + **response['output']['service']['end-point'][1]['name'][0]), + response['output']['service']['end-point'][1]['name'][0]) # The sleep here is okey as the DSR service creation is very fast # time.sleep(self.WAITING) + def get_service_DSR(self): response = test_utils.get_ordm_serv_list_attr_request("services", str(tpcetest.uuid_services.dsr)) tpcetest.assertEqual(response['status_code'], requests.codes.ok) @@ -643,6 +668,7 @@ def get_service_DSR(self): print("Time to retrieve topology : 100 seconds... Hurry up") time.sleep(100) + def delete_created_tapi_services(self): delete_connectivity_service_DSR(self) delete_connectivity_service_ODU(self) @@ -652,6 +678,7 @@ def delete_created_tapi_services(self): delete_connectivity_service_PhotonicMedia(self) get_no_tapi_services() + def delete_connectivity_service_DSR(self): self.del_serv_input_data["uuid"] = str(tpcetest.uuid_services.dsr) response = test_utils.transportpce_api_rpc_request( @@ -659,6 +686,7 @@ def delete_connectivity_service_DSR(self): tpcetest.assertIn(response["status_code"], (requests.codes.ok, requests.codes.no_content)) time.sleep(self.WAITING) + def delete_connectivity_service_ODU(self): self.del_serv_input_data["uuid"] = str(tpcetest.uuid_services.odu) response = test_utils.transportpce_api_rpc_request( @@ -666,6 +694,7 @@ def delete_connectivity_service_ODU(self): tpcetest.assertIn(response["status_code"], (requests.codes.ok, requests.codes.no_content)) time.sleep(self.WAITING) + def delete_connectivity_service3_ODU(self): self.del_serv_input_data["uuid"] = str(tpcetest.uuid_services3.odu) response = test_utils.transportpce_api_rpc_request( @@ -673,6 +702,7 @@ def delete_connectivity_service3_ODU(self): tpcetest.assertIn(response["status_code"], (requests.codes.ok, requests.codes.no_content)) time.sleep(self.WAITING) + def delete_connectivity_service_PhotonicMedia(self): self.del_serv_input_data["uuid"] = str(tpcetest.uuid_services.pm) response = test_utils.transportpce_api_rpc_request( @@ -680,6 +710,7 @@ def delete_connectivity_service_PhotonicMedia(self): tpcetest.assertIn(response["status_code"], (requests.codes.ok, requests.codes.no_content)) time.sleep(self.WAITING) + def delete_connectivity_service3_PhotonicMedia(self): self.del_serv_input_data["uuid"] = str(tpcetest.uuid_services3.pm) response = test_utils.transportpce_api_rpc_request( @@ -687,6 +718,7 @@ def delete_connectivity_service3_PhotonicMedia(self): tpcetest.assertIn(response["status_code"], (requests.codes.ok, requests.codes.no_content)) time.sleep(self.WAITING) + def delete_connectivity_service2_PhotonicMedia(self): self.del_serv_input_data["uuid"] = str(tpcetest.uuid_services2.pm) response = test_utils.transportpce_api_rpc_request( @@ -694,6 +726,7 @@ def delete_connectivity_service2_PhotonicMedia(self): tpcetest.assertIn(response["status_code"], (requests.codes.ok, requests.codes.no_content)) time.sleep(self.WAITING) + def get_no_tapi_services(self): response = test_utils.transportpce_api_rpc_request( 'tapi-connectivity', 'get-connectivity-service-list', None) @@ -703,6 +736,7 @@ def get_no_tapi_services(self): "error-message": "No services exist in datastore"}, response['output']['errors']['error']) + def cleanup_and_desinstall_tapi_feature(): disconnect_spdrA_C() disconnect_roadmA_C() @@ -712,6 +746,7 @@ def cleanup_and_desinstall_tapi_feature(): # response = test_utils.get_ordm_serv_list_request() # tpcetest.assertEqual(response['status_code'], requests.codes.conflict) + def disconnect_spdrA_C(): response = test_utils.unmount_device("SPDR-SA1") if response.status_code not in [204]: @@ -720,6 +755,7 @@ def disconnect_spdrA_C(): if response.status_code not in [204]: print("disconnection of SPDR-SC1 failed") + def disconnect_roadmA_C(): response = test_utils.unmount_device("ROADM-A1") if response.status_code not in [204]: @@ -728,6 +764,7 @@ def disconnect_roadmA_C(): if response.status_code not in [204]: print("disconnection of ROADM-C1 failed") + def uninstall_Tapi_Feature(): test_utils.uninstall_karaf_feature("odl-transportpce-tapi") time.sleep(5) @@ -736,16 +773,16 @@ def uninstall_Tapi_Feature(): print("Tapi Feature uninstallation :") # tpcetest.assertEqual(response['status_code'], requests.codes.ok) # print("Tapi Feature uninstalled") - if('node' not in response['network'][0] and 'ietf-network-topology:link' not in response['network'][0]): - print(" otn topology empty") + if ('node' not in response['network'][0] and 'ietf-network-topology:link' not in response['network'][0]): + print(" otn topology empty") # tpcetest.assertNotIn('node', response['network'][0]) # tpcetest.assertNotIn('ietf-network-topology:link', response['network'][0]) response = test_utils.get_ietf_network_request('openroadm-topology', 'config') if ((requests.codes.ok in response['status_code']) and ('node' not in response['network'][0] and 'ietf-network-topology:link' not in response['network'][0])): - # tpcetest.assertEqual(response['status_code'], requests.codes.ok) - # tpcetest.assertNotIn('node', response['network'][0]) - # tpcetest.assertNotIn('ietf-network-topology:link', response['network'][0]) + # tpcetest.assertEqual(response['status_code'], requests.codes.ok) + # tpcetest.assertNotIn('node', response['network'][0]) + # tpcetest.assertNotIn('ietf-network-topology:link', response['network'][0]) print("OpenROADM topology also empty") print("Confirm Tapi Feature correctly uninstalled") diff --git a/tests/transportpce_tests/pce/test05_pce_tapi.py b/tests/transportpce_tests/pce/test05_pce_tapi.py index af012b9a2..8f3e6dfd3 100644 --- a/tests/transportpce_tests/pce/test05_pce_tapi.py +++ b/tests/transportpce_tests/pce/test05_pce_tapi.py @@ -197,7 +197,7 @@ class TransportPCEtest(unittest.TestCase): # cr_serv_input_data is used for tapi-connectivity service creation. However, at that stage we create service # using OR PCE and OR renderer (in a first step, as TAPI Renderer is not available). Thus to trigger path - # through OR PCE, considering initial request through TAPI API will be converted to an OR service-create, we need : + # through OR PCE, considering initial request through TAPI API will be converted to an OR service-create, we need : # 1) To use a service name that iS NOT a UUID but a string # 2) To use as the local-id, the name of the node in the OPENROADM topology cr_serv_input_data = { @@ -301,7 +301,7 @@ class TransportPCEtest(unittest.TestCase): uuid_services = UuidServices() del_serv_input_data = {"uuid": "TBD"} - + tapi_topo = {"topology-id": "TBD"} @@ -415,7 +415,7 @@ class TransportPCEtest(unittest.TestCase): self.assertEqual(response['services'][0]['connection-type'], 'infrastructure') self.assertEqual(response['services'][0]['lifecycle-state'], 'planned') time.sleep(self.WAITING) - + def test_05_successfull_path_computation_ODU4(self): self.path_computation_input_data["service-a-end"]["service-format"] = "ODU" @@ -436,7 +436,7 @@ class TransportPCEtest(unittest.TestCase): self.assertIn('Path is calculated', response['output']['configuration-response-common']['response-message']) print(response['output']['response-parameters']['path-description']) - + self.assertEqual(response['output']['response-parameters']['path-description']['aToZ-direction']['rate'], 100) node_to_find = [self.s2Auuid, self.s2Cuuid] # tp to find are the iOTU CEP @@ -482,14 +482,14 @@ class TransportPCEtest(unittest.TestCase): } input_dict_2 = {'value-name': 'OpenROADM node id', 'value': 'SPDR-SC1-XPDR2'} input_dict_3 = {'value-name': 'OpenROADM node id', 'value': 'SPDR-SA1-XPDR2'} - + self.assertDictEqual(dict(input_dict_1, **response['output']['service']), response['output']['service']) self.assertDictEqual(input_dict_2, response['output']['service']['end-point'][0]['name'][0]) self.assertDictEqual(input_dict_3, response['output']['service']['end-point'][1]['name'][0]) # If the gate fails is because of the waiting time not being enough time.sleep(self.WAITING) - + def test_07_get_ODU4_service1(self): response = test_utils.get_ordm_serv_list_attr_request("services", "serviceOdu4-1") self.assertEqual(response['status_code'], requests.codes.ok) @@ -499,7 +499,7 @@ class TransportPCEtest(unittest.TestCase): self.assertEqual(response['services'][0]['connection-type'], 'infrastructure') self.assertEqual(response['services'][0]['lifecycle-state'], 'planned') time.sleep(1) - + def test_08_successfull_path_computation_100GE_service__spdr_x2(self): # service-format set to other + service-rate set to 100 leads to 100GEs serviceType internally (switch) self.path_computation_input_data["service-a-end"]["service-format"] = "other"